<template>
    <div v-show="visible">
        <div class="main-view">
            <div class="window-info-view">
                <div class="top-view">
                    <div class="left-title">本周事件</div>
                    <div class="close-btn" @click="close"></div>
                </div>
                <div class="top-line"></div>
                <div class="bottom-view">
                    <div class="left-chart">
                        <div class="chart-item">
                            <div class="number-text">32%</div>
                            <div class="title-text">事件环比</div>
                        </div>
                    </div>
                    <div class="right-statistical">
                        <div class="statistical-row">
                            <div class="yellow-rect"></div>
                            <div class="statistical-text">工地事件上升</div>
                            <div class="number-text" style="color: #FED52F;">12</div>
                            <div class="unit-text">件</div>
                        </div>
                        <div class="statistical-row">
                            <div class="blue-rect"></div>
                            <div class="statistical-text">车辆事件上升</div>
                            <div class="number-text" style="color: #76FAFF;">16</div>
                            <div class="unit-text">件</div>
                        </div>
                        <div class="statistical-row">
                            <div class="red-rect"></div>
                            <div class="statistical-text">违章事件上升</div>
                            <div class="number-text" style="color: #FF4645;">12</div>
                            <div class="unit-text">件</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'windowInfo',
    data(){
        return{
            visible:false,
        }
    },
    methods:{
        close(){
            this.visible = false
        },
        open(){
            this.visible = true
        }
    }
}
</script>

<style scoped lang="scss">
.main-view{
    width: 438px;
    height: 184px;
    background: url("/static/img/chart_window_info_bg.png") no-repeat;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;

    .window-info-view{
        width: 312px;
        height: 171px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;

        .top-view{
            width: 100%;
            height: auto;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            margin-top: 5px;

            .left-title{
                font-size: 18px;
                color: #FFFFFF;
                font-weight: bolder;
                width: 85%;
                display: flex;
                flex-direction: row;
                align-items: center;
                justify-content: center;
            }

            .close-btn{
                width: 23px;
                height: 22px;
                background: url("/static/img/chart_window_info_close_icon_red.png") no-repeat;
            }
            .close-btn:hover{
                width: 23px;
                height: 22px;
                background: url("/static/img/chart_window_info_close_icon_yellow.png") no-repeat;
            }
        }

        .top-line{
            width: 242px;
            height: 6px;
            background: url("/static/img/window_info_top_line.png") no-repeat;
        }

        .bottom-view{
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;

            .left-chart{
                .chart-item{
                    width: 86px;
                    height: 86px;
                    background: url("/static/img/chart_window_info_left_icon.png") no-repeat;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;

                    .number-text{
                        color: #1FF2ED;
                        font-weight: bolder;
                        font-size: 18px;
                    }

                    .title-text{
                        color: #FFFFFF;
                        font-weight: bolder;
                        font-size: 14px;
                    }
                }
            }

            .right-statistical{
                width: 200px;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;

                .statistical-row{
                    width: 100%;
                    height: auto;
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: flex-start;
                    margin-top: 10px;
                    .red-rect{
                        width: 7px;
                        height: 7px;
                        background: url("/static/img/red_rect.png") no-repeat;
                        margin-left: 10px;
                    }

                    .yellow-rect{
                        width: 7px;
                        height: 7px;
                        background: url("/static/img/yellow_rect.png") no-repeat;
                        margin-left: 10px;
                    }

                    .blue-rect{
                        width: 7px;
                        height: 7px;
                        background: url("/static/img/blue_rect.png") no-repeat;
                        margin-left: 10px;
                    }

                    .statistical-text{
                        color: #FFFFFF;
                        font-size: 15px;
                        margin-left: 10px;
                    }
                    .number-text{
                        font-size: 22px;
                        color: #FFFFFF;
                        font-weight: bolder;
                        margin-left: 5px;
                    }
                    .unit-text{
                        color: #FFFFFF;
                        font-size: 14px;
                        margin-left: 5px;
                    }

                }
            }

        }

    }

}
</style>
